﻿<%@ Page Language="C#" MasterPageFile="~/travel-insurance/Travel_Insurance.master"
    AutoEventWireup="true" CodeFile="rsa_proposal_form.aspx.cs" Inherits="travel_insurance_rsa_proposal_form" %>

<%@ Register Src="~/controls/usrPhoneNo.ascx" TagName="usrPhoneNo" TagPrefix="uc1" %>
<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrIdType.ascx" TagName="usrIdType" TagPrefix="uc3" %>
<%@ Register Src="~/controls/usrIdNumber.ascx" TagName="usrIdNumber" TagPrefix="uc4" %>
<%@ Register Src="~/controls/usrCompanyLogoByServices.ascx" TagName="usrCompanyLogoByServices"
    TagPrefix="uc5" %>
<%@ Register Src="~/controls/usrSalutation.ascx" TagName="usrSalutation" TagPrefix="uc6" %>
<%@ Register Src="~/controls/usrNationality.ascx" TagName="usrNationality" TagPrefix="uc7" %>
<%@ Register Src="~/controls/usrGender.ascx" TagName="usrGender" TagPrefix="uc8" %>
<%@ Register Src="~/controls/usrRelationship.ascx" TagName="usrRelationship" TagPrefix="uc9" %>
<%@ Register Src="~/controls/usrTraveller.ascx" TagName="usrTraveller" TagPrefix="uc10" %>
<%@ Register Src="~/controls/usrOccupation.ascx" TagName="usrOccupation" TagPrefix="uc11" %>
<%@ Register Src="~/controls/usrMaritalStatus.ascx" TagName="usrMaritalStatus" TagPrefix="uc12" %>
<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<%@ Register Src="~/controls/usrCXAds.ascx" TagName="usrCXAds" TagPrefix="ucAds" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="../../controls/CE_Date.js" type="text/javascript"></script>

    <script src="../../includes/ValidationError.js" type="text/javascript"></script>

    <script src="../../includes/ValidationEffect.js" type="text/javascript"></script>

    <script src="../../includes/LoadingProgress.js" type="text/javascript"></script>

    <script src="../../controls/IdNumber.js" type="text/javascript"></script>

    <script src="../../includes/PostCode.js" type="text/javascript"></script>

    <div class="elements_inner_wrapper">
        <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
        <div class="form_selection">
            <h3>
                <asp:Label ID="lblProvider" runat="server"></asp:Label></h3>
        </div>
        <!-- #Include file="/includes/body_loader.inc" -->
        <div id="contentBody">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <div id="tabblue">
                <ul>
                    <li><a href="#"><span>Instant Quote</span></a></li>
                    <li><a href="#"><span>Results</span></a></li>
                    <li id="current"><a href="#"><span>Proposal Form</span></a></li>
                </ul>
            </div>
            <div>
                <br />
                <br />
                <%--   <p style="font-size: Small; font-weight: bold;">
                    Travel Insurance Online Proposal Form</p>--%>
                <div class="section">
                    <fieldset>
                        <div class="form_title_top">
                            Quote Summary</div>
                        <div class="form_box">
                            <div class="row">
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row2">
                                <label for="Quote Reference Number" class="fs_lbl">
                                    Quote Reference Number
                                </label>
                                <div class="field">
                                    <span class="indicator2">
                                        <asp:Label ID="lblQref" runat="server"></asp:Label>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row2">
                                <label for="Firstname" class="fs_lbl">
                                    Type of Travel:
                                </label>
                                <div class="field">
                                    <span class="indicator2">
                                        <asp:Label ID="lblCoverageType" runat="server"></asp:Label><asp:Label ID="lblCover"
                                            runat="server" Visible="false"></asp:Label><asp:Label ID="lblCoverage" runat="server"
                                                Visible="false"></asp:Label>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <%-- <div class="row">
                                <label for="Firstname" class="fs_lbl">
                                    Insured Coverage Plan:
                                </label>
                                <div class="field">
                                    <span class="indicator">
                                        <asp:Label ID="lblInsCoverage" runat="server"></asp:Label>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>--%>
                            <div class="row2">
                                <label for="Firstname" class="fs_lbl">
                                    Country Traveling to (one or furthest):
                                </label>
                                <div class="field">
                                    <span class="indicator2">
                                        <asp:Label ID="lblDestination" runat="server"></asp:Label><asp:Label ID="lblTrip"
                                            runat="server" Visible="false"></asp:Label>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row2">
                                <label for="Firstname" class="fs_lbl">
                                    Period of Insurance:
                                </label>
                                <div class="field">
                                    <span class="indicator2">
                                        <asp:Label ID="lblPeriodOfCoverage" runat="server"></asp:Label>
                                        <asp:Label ID="lblDuration" runat="server" Visible="false"></asp:Label><asp:Label
                                            ID="lblStart" runat="server" Visible="false"></asp:Label><asp:Label ID="lblEnd" runat="server"
                                                Visible="false"></asp:Label>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row2">
                                <label for="Firstname" class="fs_lbl">
                                    Type of Plan:
                                </label>
                                <div class="field">
                                    <span class="indicator2">
                                        <asp:Label ID="lblPolicyType" runat="server"></asp:Label><asp:Label ID="lblAdultAge"
                                            runat="server" Visible="false"></asp:Label><asp:Label ID="lblChildAge" runat="server"
                                                Visible="false"></asp:Label>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>

                            <script type="text/javascript">
                                IncreaseProgress(20);
                            </script>

                            <div class="row2">
                                <label for="Firstname" class="fs_lbl">
                                    No. of Traveller/s:
                                </label>
                                <div class="field">
                                    <span class="indicator2">
                                        <asp:Label ID="lblNoOfTravellers" runat="server"></asp:Label><input id="inNoOfTravellers"
                                            runat="server" type="hidden" />
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row2">
                                <label for="Firstname" class="fs_lbl">
                                    Total Premium (w/ GST):
                                </label>
                                <div class="field">
                                    <span class="indicator2">
                                        <asp:Label ID="lblTotalPremium" runat="server"></asp:Label>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <div class="clear">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <asp:ValidationSummary ID="vstravelinsurance" runat="server" CssClass="errorSummary"
                                ValidationGroup="travel_insurance" HeaderText="Oops please complete the form" />
                        </div>

                        <script type="text/javascript">
                            IncreaseProgress(30);
                        </script>

                        <div class="form_title_top">
                            Policy Holder's Personal Particulars</div>
                        <div class="form_box">
                            <div class="row">
                                <div class="newsletter">
                                    <div class="blacksmall">
                                        Pursuant to Section 25(5) of the Insurance Act (Cap. 142), or any subsequent amendments
                                        thereof, you are to disclose in this Application, fully and faithfully, all the
                                        facts you know or ought to know, otherwise the Policy issued hereunder may be void
                                        and you may receive nothing from the Policy.<br />
                                        <br />
                                        <b>Important</b>: Main insured must be a Singapore resident, Singapore PR or Work
                                        Permit Holder and be at least 18 years of age.</div>
                                </div>
                            </div>
                            <div class="row">
                                <label for="Surname" class="mand_red">
                                    Surname</label>
                                <div class="field">
                                    <span class="indicator">
                                        <asp:TextBox ID="txtSurname" runat="server" class="text" Width="200px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvSurname" runat="server" ControlToValidate="txtSurname"
                                            CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Firstname" class="mand_red">
                                    Given/First Name</label>
                                <div class="field">
                                    <span class="indicator">
                                        <asp:TextBox ID="txtFirstname" runat="server" class="text" Width="200px"></asp:TextBox>
                                        <asp:HyperLink ID="hplEditProfile" Visible="false" NavigateUrl="~/User/EditProfile.aspx?redir=~/travel-insurance/applicants_details.aspx"
                                            Font-Size="Smaller" Text="Edit Profile" runat="server"></asp:HyperLink>
                                        <asp:RequiredFieldValidator ID="rfvFirstname" runat="server" ControlToValidate="txtFirstname"
                                            CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Gender" class="mand_red">
                                    Gender</label>
                                <div class="field">
                                    <uc8:usrGender ID="ddlGender" runat="server" ValidationGroup="travel_insurance" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Surname" class="mand_red">
                                    NRIC/Passport No</label>
                                <div class="field">
                                    <span class="indicator">
                                        <asp:TextBox ID="txtNRIC" runat="server" class="text" Width="200px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvNRIC" runat="server" ControlToValidate="txtNRIC"
                                            CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Nationality" class="mand_red">
                                    Nationality</label>
                                <div class="field">
                                    <uc7:usrNationality ID="ddlNationality" runat="server" ErrorMessage="" ValidationGroup="travel_insurance" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="dob" class="mand_red">
                                    Date of Birth</label>
                                <div class="field">
                                    <uc2:usrDate ID="usrDOBMain" runat="server" ValidationGroup="travel_insurance" IsRequired="True" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Marital Status" class="mand_red">
                                    Marital Status</label>
                                <div class="field">
                                    <uc12:usrMaritalStatus ID="ddlMaritalStatus" runat="server" IsEnabled="true" ValidationGroup="travel_insurance"
                                        ErrorMessage="" />
                                </div>
                                <div class="clear">
                                </div>
                                <div class="row">
                                    <label for="Address">
                                        Singapore Address
                                    </label>
                                </div>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <div class="row" id="divPostCode">
                                            <label for="Postcode" class="mand_red">
                                                Postcode</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:TextBox ID="txtPostCode" Width="80px" onkeypress="restrictToNumbers(event)"
                                                        AutoPostBack="true" OnTextChanged="txtPostCode_TextChanged" runat="server" class="text"
                                                        MaxLength="6"></asp:TextBox>
                                                    <asp:UpdateProgress runat="server" ID="uplUpProgress" DisplayAfter="1000">
                                                        <ProgressTemplate>
                                                            <span>Loading...</span>
                                                        </ProgressTemplate>
                                                    </asp:UpdateProgress>
                                                    <asp:Button ID="btnPostCode" Visible="false" ValidationGroup="PostCode" runat="server"
                                                        Text="Get Address" OnClientClick="this.disabled=true;" />
                                                    <asp:RequiredFieldValidator ID="rfvPCode" runat="server" CssClass="validationErrorControl"
                                                        Display="Dynamic" ErrorMessage="" ValidationGroup="PostCode" ControlToValidate="txtPostCode"></asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="revPCode" runat="server" CssClass="validationErrorControl"
                                                        Display="Dynamic" ErrorMessage="" ValidationGroup="PostCode" ValidationExpression="[0-9]{6}"
                                                        ControlToValidate="txtPostCode"></asp:RegularExpressionValidator>
                                                </span><span class="indicator">
                                                    <asp:RequiredFieldValidator ID="rfvPostCode" runat="server" CssClass="validationErrorControl"
                                                        Display="Dynamic" ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtPostCode"></asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="revPostCode" runat="server" CssClass="validationErrorControl"
                                                        Display="Dynamic" ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{6}"
                                                        ControlToValidate="txtPostCode"></asp:RegularExpressionValidator>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row" runat="server" visible="false" id="divAddressList">
                                            <label for="AddressList">
                                                Please choose your address
                                            </label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlAddressList" AutoPostBack="true" runat="server" OnSelectedIndexChanged="ddlAddressList_SelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                                <div class="row" id="divUnitNo">
                                    <label for="Unit Number" class="mand_red">
                                        Unit Number</label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox ID="txtUnit1" runat="server" class="textsml"></asp:TextBox>-</span>
                                        <span class="indicator">
                                            <asp:RequiredFieldValidator ID="rfvUnit1" runat="server" CssClass="validationErrorControl"
                                                ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtUnit1"></asp:RequiredFieldValidator></span>
                                        <span class="indicator">
                                            <asp:TextBox ID="txtUnit2" runat="server" class="textsml"></asp:TextBox></span>
                                        <span class="indicator">
                                            <asp:RequiredFieldValidator ID="rfvUnit2" runat="server" CssClass="validationErrorControl"
                                                ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtUnit2"></asp:RequiredFieldValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                    <ContentTemplate>
                                        <div class="row" id="divPCAddress">
                                            <label for="Address" class="mand_red">
                                                Address</label>
                                            <div class="field">
                                                <span id="divAddress"></span>
                                                <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" MaxLength="120"
                                                    Width="300px" class="text"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rfvAddress" runat="server" CssClass="validationErrorControl"
                                                    ErrorMessage="" ValidationGroup="travel_insurance" ControlToValidate="txtAddress"></asp:RequiredFieldValidator>
                                                <%--<asp:RegularExpressionValidator ID="revAddress" runat="server" ValidationGroup="travel_insurance"
                                            ErrorMessage="" CssClass="validationErrorControl" Text="" ControlToValidate="txtAddress"
                                            ValidationExpression="^[0-9a-zA-Z''-'\s]{5,120}$"></asp:RegularExpressionValidator>--%>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>

                            <script type="text/javascript">
                                IncreaseProgress(40);
                            </script>

                            <div class="row">
                                <label for="Mobile Number" class="mand_red">
                                    Mobile Number</label>
                                <div class="field">
                                    <uc1:usrPhoneNo ID="txtMobileNo" IsEnabled="true" IsRequired="true" PhoneNoRequireErrorMessage="Require mobile number."
                                        PhoneNoErrorMessage="Mobile phone number should 8 digits." PhoneNoValidErrorMessage="Invalid mobile phone number."
                                        runat="server" ValidationGroup="travel_insurance" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Residential Phone Number">
                                    Home Number</label>
                                <div class="field">
                                    <uc1:usrPhoneNo ID="txtResidentialPhoneNo" runat="server" ValidationGroup="travel_insurance"
                                        IsRequired="False" PhoneNoValidErrorMessage="Invalid home phone number." />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Office Number">
                                    Office Number</label>
                                <div class="field">
                                    <uc1:usrPhoneNo ID="txtOfficeNo" runat="server" ValidationGroup="travel_insurance"
                                        IsRequired="False" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Fax Number">
                                    Fax Number</label>
                                <div class="field">
                                    <uc1:usrPhoneNo ID="txtFaxNo" runat="server" ValidationGroup="travel_insurance" IsRequired="False" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Mobile Number" class="mand_red">
                                    Email Address</label>
                                <div class="field">
                                    <asp:TextBox ID="txtEmailAddress" runat="server" class="text" Width="200px" ></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvEmailAddress" runat="server" ControlToValidate="txtEmailAddress"
                                        Display="Dynamic" CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revEmailAddress" runat="server" ControlToValidate="txtEmailAddress"
                                        CssClass="validationErrorControl" ErrorMessage="" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                        ValidationGroup="travel_insurance"></asp:RegularExpressionValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row">
                                <label for="Occupation">
                                    Occupation</label>
                                <div class="field">
                                    <uc11:usrOccupation ID="usrOccupation" runat="server" ValidationGroup="travel_insurance" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>

                            <script type="text/javascript">
                                IncreaseProgress(50);
                            </script>

                        </div>
                        <div id="divTravellersInsured" runat="server">
                            <div class="form_title" onclick="ShowHideDiv('divInsured',true)">
                                Insured Travel Partner's Particulars
                            </div>
                            <div class="clear">
                            </div>
                            <div class="form_box">
                                <div id="divInsured">
                                    <div id="divFamily" runat="server">
                                        <div class="row">
                                            <label for="insured" class="mand_red">
                                                Name of Insured</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:TextBox ID="txtInsuredFamily" runat="server" class="text" Width="200px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvInsuredFamily" runat="server" ControlToValidate="txtInsuredFamily"
                                                        CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row">
                                            <label for="insured" class="mand_red">
                                                Relationship</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:TextBox ID="txtRelationship" runat="server" class="text" Width="200px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvRelationship" runat="server" ControlToValidate="txtRelationship"
                                                        CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row">
                                            <label for="Gender" class="mand_red">
                                                Gender</label>
                                            <div class="field">
                                                <uc8:usrGender ID="ddlGenderInsured" runat="server" ValidationGroup="travel_insurance" />
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>

                                        <script type="text/javascript">
                                            IncreaseProgress(60);
                                        </script>

                                        <div class="row">
                                            <label for="insured" class="mand_red">
                                                NRIC/Passport number</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:TextBox ID="txtNRICPassInsuredFamily" runat="server" class="text" Width="200px"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvNRICPassInsuredFamily" runat="server" ControlToValidate="txtNRICPassInsuredFamily"
                                                        CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row">
                                            <label for="Nationality" class="mand_red">
                                                Nationality</label>
                                            <div class="field">
                                                <uc7:usrNationality ID="ddlNationalityInsured" runat="server" ErrorMessage="" ValidationGroup="travel_insurance" />
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row">
                                            <label for="dob" class="mand_red">
                                                Date of Birth</label>
                                            <div class="field">
                                                <uc2:usrDate ID="usrDOBInsuredFamily" runat="server" ValidationGroup="travel_insurance"
                                                    IsRequired="True" />
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <script type="text/javascript">
                            IncreaseProgress(70);
                        </script>

                        <div id="divPaymentModeHeader">
                            <div class="form_title" onclick="ShowHideDiv('divPaymentMode',true)">
                                Payment Mode</div>
                            <div class="clear">
                            </div>
                        </div>
                        <div style="display: " class="form_box" id="divPaymentMode">
                            <div id="divCreditcard" style="display: ;">
                                <div class="form_box">
                                <div class="row">
                                    <div class="blacksmall">
                                        <p>
                                            I/We agree to pay the premium and hereby authorize Royal & Sun Alliance Insurance
                                            Plc (Singapore Branch) to charge the stated premium to the below credit card/bank
                                            account. Where a third party credit card is used, I/We declare that the Cardholder
                                            has authorized and consented to its use.</p>
                                    </div>
                                </div>
                                </div>
                                <div class="row" id="divNameoftheCard">
                                    <label for="NameoftheCard" class="mand_red">
                                        Cardholder's Name</label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox ID="txtNameoftheCard" runat="server" MaxLength="50"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvNameoftheCard" ControlToValidate="txtNameoftheCard"
                                                ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl"
                                                runat="server"></asp:RequiredFieldValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row" id="divIssuingBank">
                                    <label for="Issuing Bank" class="mand_red">
                                        Issuing Bank</label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox ID="txtIssuingBank" runat="server" MaxLength="10"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvIssuingBank" ControlToValidate="txtIssuingBank"
                                                ErrorMessage="" ValidationGroup="travel_insurance" CssClass="validationErrorControl"
                                                runat="server"></asp:RequiredFieldValidator>
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row" id="divCardNo">
                                    <label for="CardNo" class="mand_red">
                                        Credit Card Number</label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:TextBox ID="txtCardNo1" runat="server" MaxLength="4" Width="50px"></asp:TextBox>-</span>
                                        <span class="indicator">
                                            <asp:TextBox ID="txtCardNo2" runat="server" MaxLength="4" Width="50px"></asp:TextBox>-</span>
                                        <span class="indicator">
                                            <asp:TextBox ID="txtCardNo3" runat="server" MaxLength="4" Width="50px"></asp:TextBox>-</span>
                                        <span class="indicator">
                                            <asp:TextBox ID="txtCardNo4" runat="server" MaxLength="4" Width="50px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvCardNo1" ControlToValidate="txtCardNo1" ErrorMessage=""
                                                ValidationGroup="travel_insurance" CssClass="validationErrorControl"
                                                runat="server"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revCardNo1" runat="server" CssClass="validationErrorControl"
                                                ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
                                                ControlToValidate="txtCardNo1"></asp:RegularExpressionValidator>
                                            <asp:RequiredFieldValidator ID="rfvCardNo2" ControlToValidate="txtCardNo2" ErrorMessage=""
                                                ValidationGroup="travel_insurance" CssClass="validationErrorControl"
                                                runat="server"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revCardNo2" runat="server" CssClass="validationErrorControl"
                                                ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
                                                ControlToValidate="txtCardNo2"></asp:RegularExpressionValidator>
                                            <asp:RequiredFieldValidator ID="rfvCardNo3" ControlToValidate="txtCardNo3" ErrorMessage=""
                                                ValidationGroup="travel_insurance" CssClass="validationErrorControl"
                                                runat="server"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revCardNo3" runat="server" CssClass="validationErrorControl"
                                                ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
                                                ControlToValidate="txtCardNo3"></asp:RegularExpressionValidator>
                                            <asp:RequiredFieldValidator ID="rfvCardNo4" ControlToValidate="txtCardNo4" ErrorMessage=""
                                                ValidationGroup="travel_insurance" CssClass="validationErrorControl"
                                                runat="server"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revCardNo4" runat="server" CssClass="validationErrorControl"
                                                ErrorMessage="" ValidationGroup="travel_insurance" ValidationExpression="[0-9]{4}"
                                                ControlToValidate="txtCardNo4"></asp:RegularExpressionValidator>
                                        </span>
                                        <div style="clear: both">
                                            <asp:CustomValidator CssClass="validationErrorControl" ControlToValidate="txtCreditCardValid"
                                                ValidationGroup="travel_insurance" ID="csvCreditCardValid" runat="server" ErrorMessage="Credit Card number not valid."
                                                Text="" OnServerValidate="csvCreditCardValid_ServerValidate"></asp:CustomValidator>
                                        </div>
                                        <div class="row" style="display: none">
                                            <asp:TextBox ID="txtCreditCardValid" Text="Valid" runat="server"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>

                                <script type="text/javascript">
                                    IncreaseProgress(80);
                                </script>

                                <div class="row" id="divCardExpiry">
                                    <label for="Card Expiry Date" class="mand_red">
                                        Card Expiry Date</label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:DropDownList ID="ddlCardExpiryMonth" runat="server">
                                                <asp:ListItem Selected="True" Value="-1">mm</asp:ListItem>
                                                <asp:ListItem Value="01">01</asp:ListItem>
                                                <asp:ListItem Value="02">02</asp:ListItem>
                                                <asp:ListItem Value="03">03</asp:ListItem>
                                                <asp:ListItem Value="04">04</asp:ListItem>
                                                <asp:ListItem Value="05">05</asp:ListItem>
                                                <asp:ListItem Value="06">06</asp:ListItem>
                                                <asp:ListItem Value="07">07</asp:ListItem>
                                                <asp:ListItem Value="08">08</asp:ListItem>
                                                <asp:ListItem Value="09">09</asp:ListItem>
                                                <asp:ListItem Value="10">10</asp:ListItem>
                                                <asp:ListItem Value="11">11</asp:ListItem>
                                                <asp:ListItem Value="12">12</asp:ListItem>
                                            </asp:DropDownList>
                                            /</span> <span class="indicator">
                                                <asp:DropDownList ID="ddlCardExpiryYear" runat="server">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ID="rfvCardExpiryMonth" ControlToValidate="ddlCardExpiryMonth"
                                                    ErrorMessage="" ValidationGroup="travel_insurance" InitialValue="-1" Text=""
                                                    CssClass="validationErrorControl" runat="server"></asp:RequiredFieldValidator>
                                                <asp:RequiredFieldValidator ID="rfvCardExpiryYear" ControlToValidate="ddlCardExpiryYear"
                                                    ErrorMessage="" ValidationGroup="travel_insurance" InitialValue="-1" Text=""
                                                    CssClass="validationErrorControl" runat="server"></asp:RequiredFieldValidator>
                                                <asp:CustomValidator CssClass="validationErrorControl" ControlToValidate="txtCCExpiredValid"
                                                    ValidationGroup="travel_insurance" ID="csvCCExpiredValid" runat="server" ErrorMessage="Credit Card expire not valid."
                                                    Text="" OnServerValidate="csvCCExpiredValid_ServerValidate"></asp:CustomValidator>
                                                <span style="display: none">
                                                    <asp:TextBox ID="txtCCExpiredValid" Text="Valid" runat="server"></asp:TextBox>
                                                </span>
                                            </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row" id="divCardType">
                                    <label for="CardType" class="mand_red">
                                        Card Type</label>
                                    <div class="field2">
                                        <div>
                                            <span class="form_i_cap">(Only VISA or Master Credit Card is acceptable for premium
                                                payment)</span>
                                        </div>
                                        <div class="radiol" id="divVisa" style="margin-left:0px;">
                                            <span class="indicator">
                                                <asp:RadioButton onclick="ValCheckCardType();CheckCardTypeValidationCss();" ID="rdoVisa"
                                                    runat="server" GroupName="cardtype" />
                                                <span class="radioalign">
                                                    <asp:Label ID="lblVisa" runat="server" Text="VISA"></asp:Label></span> </span>
                                        </div>
                                        <div class="radior" id="divMasterCard">
                                            <span class="indicator">
                                                <asp:RadioButton onclick="ValCheckCardType();CheckCardTypeValidationCss();" ID="rdoMasterCard"
                                                    runat="server" GroupName="cardtype" />
                                                <span class="radioalign">
                                                    <asp:Label ID="lblMasterCard" runat="server" Text="MasterCard"></asp:Label></span>
                                            </span>
                                        </div>
                                        <div style="display: none">
                                            <asp:TextBox ID="txtCardType" runat="server"></asp:TextBox></div>
                                        <asp:RequiredFieldValidator ID="rfvCardType" runat="server" CssClass="validationErrorControl"
                                            Display="Dynamic" ErrorMessage="" ControlToValidate="txtCardType" ValidationGroup="travel_insurance"
                                            Text=""></asp:RequiredFieldValidator>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="blacksmall">
                                        <p>
                                            I/We understand and agree that in the event of refund from the Company, payment
                                            will be made to the Insured/Policyholder stated in the Policy.</p>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="clear">
                                </div>
                            </div>
                            <div id="divDeclarationHeader">
                                <div class="form_title">
                                    Declaration</div>
                                <div class="clear">
                                </div>
                            </div>

                            <script type="text/javascript">
                                IncreaseProgress(90);
                            </script>

                            <div class="form_box">
                                <div class="row">
                                    <div class="blacksmall">
                                        <p>
                                            I/We declare to the best of my/our knowledge and belief that:<br/><br />
                                            a. all the answers given in this Proposal are true;</p>
                                            <p> b. all material information affecting the assessment of the risk have been disclosed;  &nbsp;&nbsp;&nbsp;&nbsp;<span style="cursor: pointer;" onclick="showhide('divDeclaration');" class="form_i_cap">
                                                More Info
                                                <img id='imgDeclaration' alt="Click to show/hide More Info" border="0" src="../../images/icons/sort_down.GIF" /></span></p>
                                    </div>
                                </div>
                                <div style="display: " id="divDeclaration">
                                    <div class="row">
                                        <div class="blacksmall">
                                            <p>
                                                c. all persons proposed are residents of Singapore
                                            </p>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="blacksmall">
                                            <p>
                                                d. all persons proposed are in good health, free from any physical defect or infirmity,
                                                are not receiving medical treatment of any kind and are not suffering nor have suffered
                                                from a recurring illness;</p>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="blacksmall">
                                            <p>
                                                I/We agree that this Proposal and Declaration shall be deemed incorporated in such
                                                contract, subject to the Terms and Conditions of the Policy. No insurance will be
                                                in force until this Proposal has been accepted by Royal & Sun Alliance Insurance
                                                Plc (Singapore Branch).</p>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="blacksmall">
                                            <p>
                                                I/We further declare that I/We are not travelling contrary to the advise of a Medical
                                                Practitioner, or for the purpose of obtaining medical treatment.</p>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="blacksmall">
                                            <p>
                                                If this Proposal has not been completed by me personally, I declare also that I
                                                have read the completed form and accept full responsibility for the answers.</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="formButtons" id="divFormButtons">
                            <div class="cancel">
                                <span>
                                    <asp:ImageButton ID="ibtnBack" runat="server" ImageUrl="~/images/buttons/form_back_but.gif"
                                        CausesValidation="False" OnClientClick="return confirm('Are you sure to go previous step?');"
                                        AlternateText="Go Previous Step" ToolTip="Go Back" OnClick="ibtnBack_Click" onmouseover="this.src='/images/buttons/form_back_but_o.gif';"
                                        onmouseout="this.src='/images/buttons/form_back_but.gif';" /></span>
                            </div>
                            <div class="button2">
                                <span>
                                    <asp:ImageButton ID="ibtSubmit" runat="server" ValidationGroup="travel_insurance"
                                        OnClientClick="LoadValidationErrorCss();CheckOptionValidationCss();" ImageUrl="~/images/buttons/submit_but.gif"
                                        OnClick="ibtSubmit_Click" class="img_align_right" onmouseover="this.src='/images/buttons/submit_but_o.gif';"
                                        onmouseout="this.src='/images/buttons/submit_but.gif';" /></asp:ImageButton>
                                </span>
                            </div>
                        </div>
                        <div class="clear">
                        </div>
                        <!-- 
                        <div class="ssl_msg">
                            <span>You are currently in a secured environment</span> Our form has been encrypted
                            with SSL to protect personal information. View our <a href="#">privacy statement</a>
                        </div>
                        -->
                    </fieldset>
                </div>
            </div>
        </div>

        <script type="text/javascript">
            //<![CDATA[
            IncreaseProgress(100);
            HideLoading();
            //]]--> 
        </script>

    </div>

    <script type="text/javascript">

        function ShowHideDiv(divName, varOnOff) {
            if (varOnOff) {
                document.getElementById(divName).style.display = "";
            }
            else {
                document.getElementById(divName).style.display = "none";
            }

        }


        function CheckOptionValidationCss() {
            CheckCardTypeValidationCss();

        }

        function CheckValidationCss(divYes, divNo, ctrlText, valCtrl) {
            ShowValidationEffectOption(divYes, divNo, ctrlText, valCtrl);
            return true;
        }

        function CheckValidationCssThree(div1, div2, div3, ctrlText, valCtrl) {
            ShowValidationEffectOptionThree(div1, div2, div3, ctrlText, valCtrl);
            return true;
        }


        function CheckCardTypeValidationCss() {
            CheckValidationCss('divVisa', 'divMasterCard', '<%=txtCardType.ClientID%>', '<%=rfvCardType.ClientID%>');
        }

        function ValCheckCardType(varOnOff) {
            var txtCtrl = document.getElementById("<%=txtCardType.ClientID%>");
            txtCtrl.value = "1";
        }

        function Check2NRICValid(source, arguments) {
            var ddlicpass = document.getElementById('<%=txtNRIC.ClientID%>');
            var appicpass = ddlicpass.value;

            var ddlspouseicpass = document.getElementById('<%=txtNRICPassInsuredFamily.ClientID%>');
            var spouseicpass = ddlspouseicpass.value;

            var result = true;
            //alert(applicantNRIC + ' ' + spouseNRIC);

            if (appicpass == spouseicpass && appicpass != '' & spouseicpass != '') {
                result = false;
            }
            else {
                result = true;
            }

            if (result == false) {
                ddlicpass.style.backgroundColor = '#fcc';
                ddlicpass.style.border = 'Solid 1px #f00';
                ddlspouseicpass.style.backgroundColor = '#fcc';
                ddlspouseicpass.style.border = 'Solid 1px #f00';
            }
            else {
                ddlicpass.style.backgroundColor = '';
                ddlicpass.style.border = '';
                ddlspouseicpass.style.backgroundColor = '';
                ddlspouseicpass.style.border = '';

            }
            arguments.IsValid = result;
        }

        function Check2NRICValidFamily(source, arguments) {
            var ddlicpass = document.getElementById('<%=txtNRIC.ClientID%>');
            var appicpass = ddlicpass.value;

            var ddlspouseicpass = document.getElementById('<%=txtNRICPassInsuredFamily.ClientID%>');
            var spouseicpass = ddlspouseicpass.value;

            var result = true;

            if (appicpass == spouseicpass) {
                result = false;
            }
            else {
                result = true;
            }

            if (result == false) {
                ddlicpass.style.backgroundColor = '#fcc';
                ddlicpass.style.border = 'Solid 1px #f00';
                ddlspouseicpass.style.backgroundColor = '#fcc';
                ddlspouseicpass.style.border = 'Solid 1px #f00';
            }
            else {
                ddlicpass.style.backgroundColor = '';
                ddlicpass.style.border = '';
                ddlspouseicpass.style.backgroundColor = '';
                ddlspouseicpass.style.border = '';

            }
            arguments.IsValid = result;
        }

        function showhide(el) {

            el = document.getElementById(el);
            el.style.display = (el.style.display == "none") ? "block" : "none";

        }

        window.onload = function() {
            showhide('divDeclaration');
            showhide('divPaymentMode');


            if (document.getElementById('<%=txtCardType.ClientID%>').value == "1") {
                ShowHideDiv('divPaymentMode', true);
            }
            else { ShowHideDiv('divPaymentMode', false); }

        }


        function restrictToNumbers(e) {
            if ([e.keyCode || e.which] == 8 || [e.keyCode || e.which] == 37 || [e.keyCode || e.which] == 9 || [e.keyCode || e.which] == 39) //this is to allow backspace
                return true;

            if ([e.keyCode || e.which] < 48 || [e.keyCode || e.which] > 57)
                e.preventDefault ? e.preventDefault() : e.returnValue = false;
        }

        function requestByPostCode() {
            try {
                var _pcode = document.getElementById('<%=txtPostCode.ClientID%>').value;
                if (_pcode.length != 6) {
                    alert('Postal code length must be 6 numbers value.');
                    document.getElementById('<%=txtAddress.ClientID%>').value = '';
                    return false;
                }
                else {
                    requestData(_pcode);
                }
            }
            catch (e) {
                alert(e.toString());
            }
        }

        function set_data(json) {
            try {
                var srcTable = $("#divAddress").empty();
                var txtAddress = document.getElementById('<%=txtAddress.ClientID%>');
                if (json == null) {
                    $("<table><tr><td>No address found!</td></tr></table>").appendTo(srcTable);
                    alert("No address found!");
                    document.getElementById('<%=txtPostCode.ClientID%>').value = "";
                    txtAddress.value = "No Address found.";
                    return;
                }
                if (json.length == 0) {
                    $("<table><tr><td>No address found!</td></tr></table>").appendTo(srcTable);
                    alert("No address found!");
                    document.getElementById('<%=txtPostCode.ClientID%>').value = "";
                    txtAddress.value = "No Address found.";
                    return;
                }

                var tbl = $("<table width='50%'>");

                var tbody = $("<tbody>");
                var no = 1;
                for (var i = 0; i < json.length; i++) {
                    var trow = $("<tr>"), rec = json[i];
                    if (rec.t != null) {

                        var ctn = rec.t + "<br>" + rec.a;

                        //$("<td>").text(no).data("col", 1).appendTo(trow);
                        $("<td>").html(ctn).data("col", 2).appendTo(trow);
                        if (i == 0) {
                            txtAddress.value = rec.t + "\n" + rec.a;
                        }
                        else {
                            txtAddress.value += "\n\n" + rec.t + "\n" + rec.a;
                        }
                        no++;
                    }
                    trow.appendTo(tbody);
                }
                tbody.appendTo(tbl);
                //alert(srcTable);
                tbl.appendTo(srcTable);
            }
            catch (e) {
                alert(e.toString());
            }
        }

        function PostCodeChange() {
            document.getElementById('divAddress').innerHTML = "Your postcode changed.";
            document.getElementById('divAddress').style.display = 'none';
            document.getElementById('<%=txtAddress.ClientID%>').innerHTML = "Your postcode changed.";
            //document.getElementById("<%=btnPostCode.ClientID%>").disabled = false;
        }
        
    </script>

</asp:Content>
